package org.zwy.gradetrack.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.zwy.gradetrack.entity.TeacherEvaluation;

import java.math.BigDecimal;

/**
 * 教师评价Mapper接口
 */
@Mapper
public interface TeacherEvaluationMapper extends BaseMapper<TeacherEvaluation> {
    
    @Select("SELECT evaluation_score FROM teacher_evaluation " +
            "WHERE indicator_id = #{indicatorId} " +
            "AND evaluation_year = #{evaluationYear} " +
            "ORDER BY evaluation_time DESC LIMIT 1")
    BigDecimal selectLatestEvaluationScore(Long indicatorId, Integer evaluationYear);
} 